package cate.game.role.farm.adventure.msg;


import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBAdventure;
import cate.game.res.MixRes;
import cate.game.role.Role;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "【冒险】之领取挂机奖励 の 返回")
public class AdventureHangResp implements MsgOutput {

    @NoteField("旧的等级")
    public int level_old;

    @NoteField("旧的经验值")
    public long exp_old;

    @NoteField("增加的等级")
    public int level_add;

    @NoteField("增加的经验值")
    public long exp_add;

    @NoteField("新的等级")
    public int level;

    @NoteField("新的经验值")
    public long exp;

    @NoteField("可以领的分钟数")
    public int times;

    @NoteField("奖励")
    public MixRes reward = new MixRes();

    @NoteField("功能id")
    public int funcId;

    public void recordOld(Role role) {
        this.level_old = role.getBase().level;
        this.exp_old = role.getBase().exp;
    }

    public void recordAdd(int level_add, long exp_add) {
        this.level_add = level_add;
        this.exp_add = exp_add;
    }

    public void recordNew(Role role) {
        this.level = role.getBase().level;
        this.exp = role.getBase().exp;
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBAdventure.ADVENTURE_HANG_RESP;
    }
}
